<%@ page language="java" import="java.util.*" import="java.sql.*" import="util.*" pageEncoding="utf-8" errorPage="errorPage.jsp"%>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>
<%@ taglib uri="http://struts.apache.org/tags-tiles" prefix="tiles" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%  
  org.apache.struts.util.TokenProcessor.getInstance().saveToken(request);  
  %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    <title>巅峰7号-Online Test</title>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<link href="css/iStyles.css" rel="stylesheet" type="text/css" />
<script language="javascript" type="text/javascript">
	<%if (request.getAttribute("success") != null){%>alert("<%=request.getAttribute("success")%>");<%request.removeAttribute("success");}
	else if (request.getAttribute("error") != null){%>alert("<%=request.getAttribute("error")%>");<%request.removeAttribute("error");}%>
	function checkLogin(document) {
		if (document.usernameL.value == "")
		{
			alert("用户名不能为空");
			return false;
		}
		if (document.pswL.value =="")
		{
		    alert("密码不能为空");
		    return false;
		}
		document.submit();
	}
	
</script>

  </head>
  
  <body>
  <!-- CONTAINER START -->
<div id = "container">
<!-- HEADER START -->
        <div id = "top">
        	<div id = "navigation">
            	<html:link forward = "go_to_index" styleClass="link">&nbsp;&nbsp;&nbsp;&nbsp;首页</html:link>
            	<html:link forward = "go_to_notice" styleClass="link">&nbsp;&nbsp;&nbsp;&nbsp;通知</html:link>
            </div>
         </div>
        <!-- HEADER END -->
        
        <!-- LOGIN START -->
        <div id = "login">
        	<form method="post" action="login.do" name="login" onsubmit="return checkLogin(login);">
        	 <input   type="hidden"   name="org.apache.struts.taglib.html.TOKEN" 
        	value="<%=session.getAttribute("org.apache.struts.action.TOKEN")%>"   /> 
        		<div id = "userName">
            		<label>用户名：</label><input type="text" name="usernameL"
            		onkeyup="value=value.replace(/[\W]/g,'') "
            		onkeydown="if(event.keyCode==13) event.keyCode=9"/>
            	</div>
            	<div id = "password">
       		  	  <label>密&nbsp;&nbsp;&nbsp;码 ：</label><input type="password" name="pswL"/>
       	      </div>
       	        <div id = "type">
       	        <br/>
       	      </div>
           	    <div id = "rememberPWD">
           		  <input type="checkbox" name="rememberPWD" value="0" />记住密码&nbsp;
                	<a href="#" title="forget">忘记密码？</a>
   	 	      </div>
                <div id = "loginBt">
               	  <input type="submit" name="loginBt" value="登录" class="btn"/>
               	  <a href="register.do?method=init">注册</a>
              </div>
          </form>
        </div>
        <!-- LOGIN END -->
        
        <!-- CLOCK START -->
  <div id = "clock">
        	<iframe src="index/clock.html" height="407" width="296" frameborder="0" scrolling="no"
            		marginheight="0" marginwidth="0" id="clockFrame" name="clockFrame"></iframe>
</div>
        <!-- CLOCK END -->
        
        <!-- MAIN START -->
        <div id = "main">
        	<div id = "welcome">Welcome!
            <hr />
            </div>
            <div id = "notice">
           	  <html:link page="/index/notice.jsp">【通知】</html:link>
                <table>
                	<tr>
                		<td>&nbsp;&nbsp;&nbsp;<a href="#">关于...</a></td>
                        <td class="time">2011-03-30 21:00</td>
                    </tr>
                </table>
            </div>
        </div>
   	<!-- MAIN END -->
        
   	<!-- FOOTER START -->
   	<div id = "footer">
  </div>
   	<!-- FOOTER END -->
        
  </div>
    <!-- CONTAINER END -->
     
  </body>
</html>
